# coding=utf-8
#

import json
import requests

def get_hiveos_stats_data():
    """ 采集数据 """

    headers = {"accept": "*/*",
               "accept-language": "zh-CN,zh;q=0.9",
               "cache-control": "no-cache",
               "origin": "https://hiveon.com",
               "pragma": "no-cache",
               "priority": "u=1, i",
               "referer": "https://hiveon.com/",
               "sec-ch-ua": '"Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127"',
               "sec-ch-ua-mobile": "?0",
               "sec-ch-ua-platform": "Windows",
               "sec-fetch-dest": "empty",
               "sec-fetch-mode": "cors",
               "sec-fetch-site": "cross-site",
               "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36"}

    url = "https://api2.hiveos.farm/api/v2/hive/stats"

    resp = requests.get(url, headers=headers)
    return json.loads(resp.text)


if __name__ == "__main__":
    get_hiveos_stats_data()
